class route_head
{
public:
- route_head() :
-#if NEW_STRINGS
-#else
- rte_name(NULL),
- rte_desc(NULL),
-#endif
- rte_num(0),
- rte_waypt_ct(0),
- fs(NULL),
- cet_converted(0),
- line_width(-1),
- session(NULL) {}
queue Q; /* Link onto parent list. */
queue waypoint_list; /* List of child waypoints */
String rte_name;
gb_color line_color; /* Optional line color for rendering */
int line_width; /* in pixels (sigh). < 0 is unknown. */
session_t* session; /* pointer to a session struct */
+
+public:
+ route_head();
+ ~route_head();
};
/*
route_head_alloc(void)
{
route_head* rte_head = new route_head;
- QUEUE_INIT(&rte_head->Q);
- QUEUE_INIT(&rte_head->waypoint_list);
- rte_head->session = curr_session();
return rte_head;
}
static void
any_route_free(route_head* rte)
{
- waypt_flush(&rte->waypoint_list);
- if (rte->fs) {
- fs_chain_destroy(rte->fs);
- }
delete rte;
rte = NULL;
}
-
static void
any_route_add_head(route_head* rte, queue* head)
{
xfree(tdata);
}
}
+
+route_head::route_head() :
+ // Q(),
+ // waypoint_list(),
+#if !NEW_STRINGS
+ rte_name(NULL),
+ rte_desc(NULL),
+#endif
+ // rte_url(),
+ rte_num(0),
+ rte_waypt_ct(0),
+ fs(NULL),
+ cet_converted(0),
+ // line_color(),
+ line_width(-1),
+ session(curr_session())
+{
+ QUEUE_INIT(&Q);
+ QUEUE_INIT(&waypoint_list);
+};
+
+route_head::~route_head()
+{
+ waypt_flush(&waypoint_list);
+ if (fs) {
+ fs_chain_destroy(fs);
+ }
+}